﻿<Window x:Class="AzureDiagMon.Views.Main"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
        xmlns:Screens="clr-namespace:AzureDiagMon.Views.Screens"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:ViewModels="clr-namespace:AzureDiagMon.ViewModels;assembly=AzureDiagMon.ViewModels"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        Title="{Binding AppTitle}"
        Width="800"
        Height="600"
        Loaded="Window_Loaded"
        d:DataContext="{d:DesignInstance Type=ViewModels:MainViewModel, IsDesignTimeCreatable=True}" >

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/AzureDiagMon.Views.WPF;component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <i:Interaction.Triggers>
        <i:EventTrigger EventName="KeyDown">
            <cmd:EventToCommand Command="{Binding KeyDownEventCommand}" PassEventArgsToCommand="True"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Menu IsMainMenu="True">
            <MenuItem Header="_File">
                <MenuItem Header="E_xit" />
            </MenuItem>
        </Menu>

        <ToolBar Margin="0,0,0,0" Name="toolBar1" Grid.Row="1" >
            <Label Content="Storage:" />
            <ComboBox ItemsSource="{Binding StorageAccounts}" Width="130" IsEditable="False"
                      SelectedItem="{Binding SelectedStorageAccount}">

            </ComboBox>
            <Button Content=" + " Command="{Binding AddStorage}" />
            <Separator />
        </ToolBar>
        <TabControl Grid.Row="2" ItemsSource="{Binding Screens}">
            <TabItem Header="Trace logs">
                <Screens:LogViewerScreen />
            </TabItem>
        </TabControl>
    </Grid>
</Window>
